<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>首页</h1>
<div th:if="${session.logined==null}">
<button><a th:href="@{/login}">登陆</a></button>
<button><a th:href="@{/register}">注册</a></button>
</div>
<p th:text="${msg}"></p>
<p th:text="${session.logined}"></p>
<hr />
<span shiro:hasPermission="user:select">
    <button><a th:href="@{/user/add}">添加</a></button>
    <button><a th:href="@{/user/update}">更新</a></button>
</span>

</body>
</html>